<?php

namespace App\Http\Controllers\Miniapp;

use App\Http\Controllers\Controller;
use App\Models\Miniapp\Category;

class CategoryController extends Controller
{
    /**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
    public function index()
    {
        $items = Category::latest('orderby')->get();
        return $this->successful($items);
    }

    /**
     * Display the specified resource.
     *
     * @param  \App\Models\miniapp\Category  $category
     * @return \Illuminate\Http\Response
     */
    public function show(Category $category)
    {
        return $this->successful($category);
    }
}
